import * as React from 'react';
import TakePhoto from './pages/takePhoto';
import Index from './pages/index';
import { NavigationContainer } from '@react-navigation/native';
import { createStackNavigator } from '@react-navigation/stack';
import store from "./store/mobx";
import { Provider} from "mobx-react";
import Result from "./pages/result"
import Scan from "./pages/scan"
import testPage from "./pages/testPage"

// 导航栏
const Stack = createStackNavigator();
function App() {
  return (
    <Provider rootStore={store} >
      <NavigationContainer>
        <Stack.Navigator initialRouteName="index">  
          <Stack.Screen 
          name="index" 
          component={Index} 
          options={{
            headerTitleAlign: 'center',  // 设置标题水平居中
            headerTitle: '湖北烟草卷烟商标纸真伪鉴别验证原型'    //标题内容
                  }}
          />
          <Stack.Screen 
          name="takePhoto" 
          component={TakePhoto} 
          options={{
            headerTitleAlign: 'center',  // 设置标题水平居中
            headerTitle: '湖北烟草卷烟商标纸真伪鉴别验证原型'    //标题内容
                  }}
          />
          <Stack.Screen 
          name="result" 
          component={Result} 
          options={{
            headerTitleAlign: 'center',  // 设置标题水平居中
            headerTitle: '湖北烟草卷烟商标纸真伪鉴别验证原型'    //标题内容
                  }}
          />
          <Stack.Screen 
          name="scan" 
          component={Scan}  
          options={{
            headerTitleAlign: 'center',  // 设置标题水平居中
            headerTitle: '湖北烟草卷烟商标纸真伪鉴别验证原型'    //标题内容
                  }}
          />
          <Stack.Screen 
          name="TestPage" 
          component={testPage}  
          options={{
            headerTitleAlign: 'center',  // 设置标题水平居中
            headerTitle: '湖北烟草卷烟商标纸真伪鉴别验证原型'    //标题内容
                  }}
          />
        </Stack.Navigator>
      </NavigationContainer>
    </Provider>
  );
}

export default App;